-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MV-532: [MV-MIOpen] Benchmark & Port AvgPool #48
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Partial review
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As MIOpen already has API for pooling group, you should integrate these functions into existing APIs.
This was discussed with the Team leader before. We still need to port Avgpool op separately. Please continue reviewing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
partial review
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just partial review until I tried to run your driver and realized that benchmark result seems to not be correct. May I ask you to check benchmark result before I continue to review? Thank you. And please run make analyze
after that because I also tried to run it and the PR produced some errors, please fix those errors too.
Please continue reviewing @littlecutebird @cognaiger9 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Partial review (without driver and gtest)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other reviews
std::vector<size_t> ComputeStrides(std::vector<size_t> inputDim) const | ||
{ | ||
if(!is_contiguous) | ||
std::swap(inputDim.front(), inputDim.back()); | ||
std::vector<size_t> strides(inputDim.size()); | ||
strides.back() = 1; | ||
for(int i = inputDim.size() - 2; i >= 0; --i) | ||
strides[i] = strides[i + 1] * inputDim[i + 1]; | ||
if(!is_contiguous) | ||
std::swap(strides.front(), strides.back()); | ||
return strides; | ||
} | ||
}; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@long10024070 maybe we should put this function into an util file in gtest instead of duplicating it in every gtest files
LGTM |
OK |
Added AvgPool 2D 3D forward and backward with new solvers and bfp16 supported.
Added driver test and gtest for AvgPool.
New API is guarded by MIOPEN_BETA_API macro.
Compared to ROCm pytorch: Link
Average over all cases:
AvgPool 2D